package exception;

import java.sql.SQLIntegrityConstraintViolationException;

public class TestDemo2 {
    public static void main(String[] args) {
        System.out.println("开始");
        try{
            String str = "abcdef";
            System.out.println(str.length());
            System.out.println(str.charAt(6));
            System.out.println(Integer.parseInt(str));
            System.out.println("---------------------");
        }catch(Exception e)
        {
            System.out.println("未知异常");
        }
    }
}
